<div id="pageoptions">
    <%= link_to "< back to group word list", {# link_to options
                    :controller => 'word',
                    :action => 'group_words',
                    :group_id => @group.id }
    %>
    
    
</div>
<div class="sectionwrap">
    <% if @story then %>
    <div class="sectiontitle">
    Words from <%= link_to "#{@story.title}", {# link_to options
            :controller => 'story',
            :action => 'view',
            :id => @story.id } %></div>
    <div class="storydates">Created: <%= h(@story.created_at.strftime(" %m/%d/%Y %I:%M%p")) %>  <%= if @story.updated_at then 
                                                                                                                "Modified: #{h(@story.updated_at.strftime(' %m/%d/%Y %I:%M%p'))}"
                                                                                                            end %></div>                                                                                                          
    <% end %>
    <% for word in @words %>
        <div class="studypagination">
            <% if @word_pages.length > 1 then  %>
                <%= if !@word_pages.current.first? then link_to "&lt; Prev", :page=> @word_pages.current.previous, :params => {:group_id => @group.id} else "&lt; Prev" end %> 
                <%= if !@word_pages.current.last? then link_to "Next &gt;", :page=> @word_pages.current.next, :params => {:group_id => @group.id} unless @word_pages.current.last? else "Next &gt;" end %>
            <% end %>
        </div>
        <div id="onewordwrap">
            <span class="oneword"><%= word.word.chomp %></span>
            <p>
            <%= link_to "exclude word", {# link_to options
                                    :controller => 'dud',
                                    :action => 'exclude_word',
                                    :word => h(word.word),
                                    :group_id => @group.id},
                                    {:class => "optionlink"
                                    }  %> 
            </p>
        </div>
        
    <% end %>
</div>